<?php

namespace X;

class Html {

    public static function Begin() {
        echo'<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">';
        echo'<head>';
            echo'<title>Sistema de marcaciones</title>';
            echo'<meta http-equiv="Content-Type" content="text/html; charset=utf-8">';
            echo'<link rel="stylesheet" href="/ext-3.4.0/resources/css/ext-all.css">';
            echo'<link rel="stylesheet" href="/css/layout.css">';
            echo'<script type="text/javascript" src="/ext-3.4.0/adapter/ext/ext-base.js"></script>';
            echo'<script type="text/javascript" src="/ext-3.4.0/ext-all.js"></script>';
            echo'<script type="text/javascript" src="/js/global_layout.js"></script>';
            echo'<script type="text/javascript" src="/js/x.js"></script>';

        $args = func_get_args();

        foreach ($args as $arg) {
            echo'<script type="text/javascript" src="/js/' . $arg . '"></script>';
        }

        echo'</head>';
        echo'<body>';
            echo'<table class="layout">';
                echo'<tr><td id="layout_header"></td></tr>';
                echo'<tr><td id="layout_menu"></td></tr>';
                echo'<tr><td id="layout_content"></td></tr>';
                echo'<tr><td id="layout_footer"></td></tr>';
            echo'</table>';
        echo'</body>';
        echo'<script type="text/javascript">';
        echo'Ext.onReady(function(){';\X\Menu::Generar();echo'});';
        echo'</script>';
    }

    public static function End() {
        echo'</html>';
    }

}